package com.aspose.cells;

public class ConditionalFormattingValueCollection extends CollectionBase {
   FormatCondition b;
   boolean c = false;

   ConditionalFormattingValueCollection(FormatCondition fc) {
      this.b = fc;
   }

   void a(ConditionalFormattingValueCollection var1, CopyOptions var2, int var3, int var4) {
      WorksheetCollection var5 = var1.b.a.a.b.c();
      WorksheetCollection var6 = this.b.a.a.b.c();
      this.c = var1.c;

      for(int var7 = 0; var7 < var1.getCount(); ++var7) {
         ConditionalFormattingValue var8 = var1.get(var7);
         ConditionalFormattingValue var9 = new ConditionalFormattingValue(this.b);
         var9.a(var8, var5, var6, var2, var3, var4);
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var9);
      }

   }

   public ConditionalFormattingValue get(int index) {
      return (ConditionalFormattingValue)this.a.get(index);
   }

   void a(ConditionalFormattingValue var1) {
      if (!this.c || var1.getType() != 1 && var1.getType() != 2) {
         com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
      } else {
         throw new CellsException(2, "Cannot add a CFVO with type FormatConditionValueType.Max or FormatConditionValueType.Min to IconSet's CFVOS.");
      }
   }

   public int add(int type, String value) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)(new ConditionalFormattingValue(this.b, type, value)));
      return this.getCount() - 1;
   }
}
